package com.xio.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: xio
 * @Description: 配置中心客户端控制器
 * @Date: 2020/10/9 18:27
 */
@RestController
@RequestMapping("/client")
@RefreshScope
public class ClientController {

    @Value("${server.port}")
    private String serverPort;

    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/getConfigInfo")
    public String getConfigInfo(){
        return "ServerPort:"+serverPort+",configInfo:"+configInfo;
    }
}
